<html>
<head><meta charset="utf-8"><title>How do I tell if a GenericArg is the default? · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/How.20do.20I.20tell.20if.20a.20GenericArg.20is.20the.20default.3F.html">How do I tell if a GenericArg is the default?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="220981639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/How%20do%20I%20tell%20if%20a%20GenericArg%20is%20the%20default%3F/near/220981639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/How.20do.20I.20tell.20if.20a.20GenericArg.20is.20the.20default.3F.html#220981639">(Dec 26 2020 at 22:23)</a>:</h4>
<p>For <a href="https://github.com/rust-lang/rust/issues/80379">https://github.com/rust-lang/rust/issues/80379</a>, I want to render <code>Vec&lt;usize&gt;</code> as <code>Vec&lt;usize&gt;</code>, not <code>Vec&lt;usize, Global&gt;</code>. How do I tell that <code>Global</code> is the default generic argument instead of a user-specified argument?</p>



<a name="221085473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/How%20do%20I%20tell%20if%20a%20GenericArg%20is%20the%20default%3F/near/221085473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/How.20do.20I.20tell.20if.20a.20GenericArg.20is.20the.20default.3F.html#221085473">(Dec 28 2020 at 19:31)</a>:</h4>
<p>You'll want to look at the <code>GenericParamDefKind</code> on the <code>GenericParamDef</code></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>